/**
 * Created by hsiacool on 2017/8/29.
 */
var id =  getUrlParam("id");
console.log(id);
function getUrlParam(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if (r != null){
        return unescape(r[2]);
    }else{
        return null;
    }
}
var lis = $(".news-tab li");
var t;
for(var i=0;i<lis.length;i++){
    if(lis[i].children[0].href.split("&")[0].split("=")[1]==getUrlParam("id")){
        t = lis[i];
        $(".news-tab li").removeClass("active");
        $(t).addClass("active");
    }else{

    }

}
